package com.neu.service;

import com.github.pagehelper.PageHelper;
import com.neu.dao.ShoppingFootprintMapper;
import com.neu.domain.ShoppingAdExample;
import com.neu.domain.ShoppingAdminExample;
import com.neu.domain.ShoppingFootprint;
import com.neu.domain.ShoppingFootprintExample;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;

@Service
public class ShoppingFootprintService {
	 @Resource
	private ShoppingFootprintMapper shoppingFootprintMapper;
	public List<ShoppingFootprint> querySelective(Integer page, Integer limit, String sort, String order){
		ShoppingFootprintExample example = new ShoppingFootprintExample();
		ShoppingFootprintExample.Criteria criteria = example.createCriteria();
	        criteria.andDeletedEqualTo(false);
	        if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
	            example.setOrderByClause(sort + " " + order);
	        }
	        PageHelper.startPage(page, limit);
	        return shoppingFootprintMapper.selectByExample(example);
	}
}
